ThisBuild / version := "0.1.0-SNAPSHOT"

ThisBuild / scalaVersion := "2.12.15"

lazy val root = (project in file("."))
  .settings(
    name := "HBaseNewAPIReader"
  )

val sparkVersion = "3.2.2"
val hbaseVersion = "2.4.18"
val hadoopVersion = "3.3.6"

// 报错：java.lang.ClassNotFoundException: com.google.protobuf.LiteralByteString
// 网上搜索据说是protobuf库的版本问题，新版本已经没有这个对象，使用了exclude("com.google.protobuf", "protobuf-java")
libraryDependencies ++= Seq(
  "com.google.protobuf" % "protobuf-java" % "2.5.0",
  "org.apache.spark" %% "spark-core" % sparkVersion exclude("com.google.protobuf", "protobuf-java"),  // 这个exclude不能删
  "org.apache.spark" %% "spark-graphx" % sparkVersion exclude("com.google.protobuf", "protobuf-java"),
  "org.apache.hbase" % "hbase-client" % hbaseVersion,
  "org.apache.hbase" % "hbase-common" % hbaseVersion,
  "org.apache.hbase" % "hbase-mapreduce" % hbaseVersion,
  "org.apache.hadoop" % "hadoop-mapreduce-client-core" % hadoopVersion
)
